import React from 'react';
import {ModalForm, ProFormRadio, ProFormText, ProFormUploadButton} from "@ant-design/pro-form";
import { message, Radio} from "antd";
const MyComponent = (props) => {
  const {isedit,issetEdit} = props
  return (
    <ModalForm<{
      name: string;
      company: string;
    }>
      visible={isedit}
      modalProps={ {
        onCancel:() => {issetEdit(false)}
      } }
      onFinish={async (values) => {
        console.log(values.name);
        message.success('提交成功');
        return issetEdit(false);
      }}
    >
      <div style={ {marginLeft: '0px'} }>
        <ProFormUploadButton
          name="upload"
          label="商城用户"
          max={2}
          fieldProps={ {
            name: 'file',
            listType: 'picture-card',
          } }
          action="/upload.do"
        />
      </div>
      <div>
        <ProFormText
          width={750}
          label='所属提货点'
          tooltip="所属提货点"
          placeholder='所属提货点'
        />
      </div>
      <div>
        <ProFormText
          width={750}
          label='核销员名称'
          tooltip="核销员名称"
          placeholder='核销员名称'
        />
      </div>
      <div>
        <ProFormText
          width={750}
          name="phone"
          label='手机号码'
          tooltip="手机号码"
          placeholder='手机号码'
        />
      </div>
      <div>
        <ProFormRadio.Group
          label="核销开关"
          tooltip="核销开关"
        >
          <Radio.Group defaultValue={1}>
            <Radio value={1}>开启</Radio>
            <Radio value={2}>关闭</Radio>
          </Radio.Group>
        </ProFormRadio.Group>
      </div>
      <div>
        <ProFormRadio.Group
          label="状态"
          tooltip="状态"
        >
          <Radio.Group defaultValue={1}>
            <Radio value={1}>开启</Radio>
            <Radio value={2}>关闭</Radio>
          </Radio.Group>
        </ProFormRadio.Group>
      </div>
    </ModalForm>
  );
};

export default MyComponent;
